package com.jeesite.modules.st.entity;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Table;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

@Table(name = "t_worklist", alias = "a"
)
public class WaitChangeAccount extends DataEntity<WaitChangeAccount> {
    private BigDecimal lastTake;
    private String materialName;
    private String materialCode;
    private BigDecimal productConvert;
    private BigDecimal halfConvert;
    private BigDecimal productGet;
    private BigDecimal otherOut;
    private BigDecimal breakOut;
    private BigDecimal takeSum;
    private BigDecimal currentTake;


    public BigDecimal getLastTake() {
        return lastTake;
    }

    public void setLastTake(BigDecimal lastTake) {
        this.lastTake = lastTake;
    }

    public String getMaterialName() {
        return materialName;
    }

    public void setMaterialName(String materialName) {
        this.materialName = materialName;
    }

    public String getMaterialCode() {
        return materialCode;
    }

    public void setMaterialCode(String materialCode) {
        this.materialCode = materialCode;
    }

    public BigDecimal getProductConvert() {
        return productConvert;
    }

    public void setProductConvert(BigDecimal productConvert) {
        this.productConvert = productConvert;
    }

    public BigDecimal getHalfConvert() {
        return halfConvert;
    }

    public void setHalfConvert(BigDecimal halfConvert) {
        this.halfConvert = halfConvert;
    }

    public BigDecimal getProductGet() {
        return productGet;
    }

    public void setProductGet(BigDecimal productGet) {
        this.productGet = productGet;
    }

    public BigDecimal getOtherOut() {
        return otherOut;
    }

    public void setOtherOut(BigDecimal otherOut) {
        this.otherOut = otherOut;
    }

    public BigDecimal getBreakOut() {
        return breakOut;
    }

    public void setBreakOut(BigDecimal breakOut) {
        this.breakOut = breakOut;
    }

    public BigDecimal getTakeSum() {
        return takeSum;
    }

    public void setTakeSum(BigDecimal takeSum) {
        this.takeSum = takeSum;
    }

    public BigDecimal getCurrentTake() {
        return currentTake;
    }

    public void setCurrentTake(BigDecimal currentTake) {
        this.currentTake = currentTake;
    }

    public Date getLastTime() {
        DateTime dateTime = DateUtil.lastMonth();
        return DateUtil.beginOfMonth(dateTime);
    }

    public Date getLastTimeEnd() {
        DateTime dateTime = DateUtil.lastMonth();
        return DateUtil.endOfMonth(dateTime);
    }


    public Date getCurrentTime() {
        return DateUtil.beginOfMonth(new Date());
    }

    public Date getCurrentTimeEnd() {
        return DateUtil.endOfMonth(new Date());
    }

    public static void main(String[] args) {
        DateTime dateTime = DateUtil.lastMonth();
        DateTime d = DateUtil.offsetMonth(dateTime, -1);
        System.out.println(DateUtil.beginOfMonth(d));
        System.out.println(DateUtil.endOfMonth(d));

    }

}
